using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsTagOptionRequest : GeneratedMessageLite<SnsTagOptionRequest, SnsTagOptionRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsTagOptionRequest, SnsTagOptionRequest.Builder>
		{
			private bool resultIsReadOnly;
			private SnsTagOptionRequest result;
			protected override SnsTagOptionRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsTagOptionRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsTagOptionRequest DefaultInstanceForType
			{
				get
				{
					return SnsTagOptionRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public uint OpCode
			{
				get
				{
					return this.result.OpCode;
				}
				set
				{
					this.SetOpCode(value);
				}
			}
			public ulong TagId
			{
				get
				{
					return this.result.TagId;
				}
				set
				{
					this.SetTagId(value);
				}
			}
			public string TagName
			{
				get
				{
					return this.result.TagName;
				}
				set
				{
					this.SetTagName(value);
				}
			}
			public Builder()
			{
				this.result = SnsTagOptionRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsTagOptionRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsTagOptionRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsTagOptionRequest other = this.result;
					this.result = new SnsTagOptionRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsTagOptionRequest.Builder Clear()
			{
				this.result = SnsTagOptionRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsTagOptionRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsTagOptionRequest.Builder(this.result);
				}
				return new SnsTagOptionRequest.Builder().MergeFrom(this.result);
			}
			public override SnsTagOptionRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsTagOptionRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsTagOptionRequest)
				{
					return this.MergeFrom((SnsTagOptionRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsTagOptionRequest.Builder MergeFrom(SnsTagOptionRequest other)
			{
				return this;
			}
			public override SnsTagOptionRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsTagOptionRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsTagOptionRequest._snsTagOptionRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsTagOptionRequest._snsTagOptionRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasOpCode = input.ReadUInt32(ref this.result.opCode_);
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasTagId = input.ReadUInt64(ref this.result.tagId_);
							continue;
						}
						if (num3 == 34u)
						{
							this.result.hasTagName = input.ReadString(ref this.result.tagName_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsTagOptionRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public SnsTagOptionRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public SnsTagOptionRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public SnsTagOptionRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public SnsTagOptionRequest.Builder SetOpCode(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOpCode = true;
				this.result.opCode_ = value;
				return this;
			}
			public SnsTagOptionRequest.Builder ClearOpCode()
			{
				this.PrepareBuilder();
				this.result.hasOpCode = false;
				this.result.opCode_ = 0u;
				return this;
			}
			public SnsTagOptionRequest.Builder SetTagId(ulong value)
			{
				this.PrepareBuilder();
				this.result.hasTagId = true;
				this.result.tagId_ = value;
				return this;
			}
			public SnsTagOptionRequest.Builder ClearTagId()
			{
				this.PrepareBuilder();
				this.result.hasTagId = false;
				this.result.tagId_ = 0uL;
				return this;
			}
			public SnsTagOptionRequest.Builder SetTagName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasTagName = true;
				this.result.tagName_ = value;
				return this;
			}
			public SnsTagOptionRequest.Builder ClearTagName()
			{
				this.PrepareBuilder();
				this.result.hasTagName = false;
				this.result.tagName_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int OpCodeFieldNumber = 2;
		public const int TagIdFieldNumber = 3;
		public const int TagNameFieldNumber = 4;
		private static readonly SnsTagOptionRequest defaultInstance;
		private static readonly string[] _snsTagOptionRequestFieldNames;
		private static readonly uint[] _snsTagOptionRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasOpCode;
		private uint opCode_;
		private bool hasTagId;
		private ulong tagId_;
		private bool hasTagName;
		private string tagName_ = "";
		private int memoizedSerializedSize = -1;
		public static SnsTagOptionRequest DefaultInstance
		{
			get
			{
				return SnsTagOptionRequest.defaultInstance;
			}
		}
		public override SnsTagOptionRequest DefaultInstanceForType
		{
			get
			{
				return SnsTagOptionRequest.DefaultInstance;
			}
		}
		protected override SnsTagOptionRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public uint OpCode
		{
			get
			{
				return this.opCode_;
			}
		}
		public ulong TagId
		{
			get
			{
				return this.tagId_;
			}
		}
		public string TagName
		{
			get
			{
				return this.tagName_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasOpCode && this.hasTagId && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasOpCode)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.OpCode);
				}
				if (this.hasTagId)
				{
					num += CodedOutputStream.ComputeUInt64Size(3, this.TagId);
				}
				if (this.hasTagName)
				{
					num += CodedOutputStream.ComputeStringSize(4, this.TagName);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsTagOptionRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsTagOptionRequestFieldNames = SnsTagOptionRequest._snsTagOptionRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, snsTagOptionRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasOpCode)
			{
				output.WriteUInt32(2, snsTagOptionRequestFieldNames[1], this.OpCode);
			}
			if (this.hasTagId)
			{
				output.WriteUInt64(3, snsTagOptionRequestFieldNames[2], this.TagId);
			}
			if (this.hasTagName)
			{
				output.WriteString(4, snsTagOptionRequestFieldNames[3], this.TagName);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasOpCode)
			{
				num ^= this.opCode_.GetHashCode();
			}
			if (this.hasTagId)
			{
				num ^= this.tagId_.GetHashCode();
			}
			if (this.hasTagName)
			{
				num ^= this.tagName_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsTagOptionRequest snsTagOptionRequest = value as SnsTagOptionRequest;
			return snsTagOptionRequest != null && (this.hasBaseRequest == snsTagOptionRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(snsTagOptionRequest.baseRequest_))) && (this.hasOpCode == snsTagOptionRequest.hasOpCode && (!this.hasOpCode || this.opCode_.Equals(snsTagOptionRequest.opCode_))) && (this.hasTagId == snsTagOptionRequest.hasTagId && (!this.hasTagId || this.tagId_.Equals(snsTagOptionRequest.tagId_))) && (this.hasTagName == snsTagOptionRequest.hasTagName && (!this.hasTagName || this.tagName_.Equals(snsTagOptionRequest.tagName_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsTagOptionRequest, SnsTagOptionRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<SnsTagOptionRequest, SnsTagOptionRequest.Builder>.PrintField("OpCode", this.hasOpCode, this.opCode_, writer);
			GeneratedMessageLite<SnsTagOptionRequest, SnsTagOptionRequest.Builder>.PrintField("TagId", this.hasTagId, this.tagId_, writer);
			GeneratedMessageLite<SnsTagOptionRequest, SnsTagOptionRequest.Builder>.PrintField("TagName", this.hasTagName, this.tagName_, writer);
		}
		public static SnsTagOptionRequest ParseFrom(byte[] data)
		{
			return SnsTagOptionRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsTagOptionRequest MakeReadOnly()
		{
			return this;
		}
		public static SnsTagOptionRequest.Builder CreateBuilder()
		{
			return new SnsTagOptionRequest.Builder();
		}
		public override SnsTagOptionRequest.Builder ToBuilder()
		{
			return SnsTagOptionRequest.CreateBuilder(this);
		}
		public override SnsTagOptionRequest.Builder CreateBuilderForType()
		{
			return new SnsTagOptionRequest.Builder();
		}
		public static SnsTagOptionRequest.Builder CreateBuilder(SnsTagOptionRequest prototype)
		{
			return new SnsTagOptionRequest.Builder(prototype);
		}
		static SnsTagOptionRequest()
		{
			SnsTagOptionRequest.defaultInstance = new SnsTagOptionRequest().MakeReadOnly();
			SnsTagOptionRequest._snsTagOptionRequestFieldNames = new string[]
			{
				"BaseRequest",
				"OpCode",
				"TagId",
				"TagName"
			};
			SnsTagOptionRequest._snsTagOptionRequestFieldTags = new uint[]
			{
				10u,
				16u,
				24u,
				34u
			};
			object.ReferenceEquals(micromsg.Proto.SnsTagOptionRequest.Descriptor, null);
		}
	}
}
